package com.whu.MenuHub.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;


import java.io.Serializable;
import java.sql.Timestamp;

@Data
@EqualsAndHashCode(callSuper = false)
@TableName("orders")
public class Order implements Serializable {

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @TableField("userID")
    private Integer userID;

    @TableField("addressID")
    //收获地址的id
    private Integer addressID;
    //发起订单的时间
    @TableField("orderTime")
    @JsonFormat(shape = JsonFormat.Shape.STRING,pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Timestamp orderTime;
    //接收订单的时间
    @TableField("orderRectime")
    @JsonFormat(shape = JsonFormat.Shape.STRING,pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Timestamp orderRectime;
    //订单结束的时间
    @TableField("orderFinishTime")
    @JsonFormat(shape = JsonFormat.Shape.STRING,pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Timestamp orderFinishTime;
    //订单的评价和评分
    private String comment;
    //评价的时间
    @TableField("commentTime")
    @JsonFormat(shape = JsonFormat.Shape.STRING,pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Timestamp commentTime;

    private float price;
    //口味评分
    @TableField("tasteScore")
    private float tasteScore;

    //服务评分
    @TableField("serviceScore")
    private float serviceScore;

    //环境评分
    @TableField("environmentScore")
    private float environmentScore;

    //评价的照片位置
    private String photo;

    @TableField("hasRejected")
    private boolean hasRejected;

}
